﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace xiaolanshu
{
    public partial class 发帖 : Form
    {
        public static string ll;
        public static System.Drawing.Color se;
        public 发帖()
        {
            InitializeComponent();
        }
        public delegate void mydelegate();
        public event mydelegate myevent;
        private void button1_Click(object sender, EventArgs e)
        {
            richTextBox1.Text = "";
        }

        private void button3_Click(object sender, EventArgs e)
        {
            if (openFileDialog1.ShowDialog() == DialogResult.OK) 
            {

                Clipboard.SetDataObject(Image.FromFile(openFileDialog1.FileName),true);
                richTextBox1.Paste();
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            ll = richTextBox1.Text;
            if (myevent != null)
                myevent();
            richTextBox1.Text = "";
            this.Close();

        }

        private void 发帖_Load(object sender, EventArgs e)
        {

        }

        private void button4_Click(object sender, EventArgs e)
        {
            if (colorDialog1.ShowDialog() == DialogResult.OK)
            {
                richTextBox1.ForeColor = colorDialog1.Color;
                se = colorDialog1.Color;
            }
        }

        private void richTextBox1_TextChanged(object sender, EventArgs e)
        {

        }
    }
}
